Skip to content

fix: respect language parameter in vLLM transcription API#101

Open
gordon0414 wants to merge 1 commit intoQwenLM:mainfrom
gordon0414:fix/respect-language-param-in-vllm-transcription
Open

fix: respect language parameter in vLLM transcription API#101
gordon0414 wants to merge 1 commit intoQwenLM:mainfrom
gordon0414:fix/respect-language-param-in-vllm-transcription

Conversation

@gordon0414
Copy link

When using the vLLM /v1/audio/transcriptions endpoint, the language parameter was ignored because get_generation_prompt only checked to_language and never fell back to language.

This adds a fallback so that when to_language is None, the language parameter is used instead, allowing the Whisper-compatible language field to correctly inject the language prefill into the assistant prompt.

Fixes: vllm-project/vllm#33768

Testing

Tested with Qwen3-ASR-1.7B on vLLM serving (4 languages):

Request Before After
language=ko, JA audio ラインハルト、そなたが... 라인 하르트, 소나타가 해보면 어때?
language=ko, KO audio language Korean<asr_text>도움이... 도움이 됐으면 좋겠군.
No language param language Korean<asr_text>도움이... (unchanged)

When using the vLLM /v1/audio/transcriptions endpoint, the `language`
parameter was ignored because `get_generation_prompt` only checked
`to_language` and never fell back to `language`.

This adds a fallback so that when `to_language` is None, the `language`
parameter is used instead, allowing the Whisper-compatible `language`
field to correctly inject the language prefill into the assistant prompt.

Fixes: vllm-project/vllm#33768
@lichunqiang
Copy link

@wangxiongts Please take some time to review and handle this merge request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Usage]: How to set the language in Qwen3-Asr

2 participants